(function(){
	'use strict';
	angular.module('services.workOrderData.indexMgmt')
	.factory('changeMgmtFactory',changeMgmtFactory);
	function changeMgmtFactory(Restangular,CoreService){
		return {
			query:query,
			exportView: exportView

		};
		function query(params,callback){
			Restangular.all('sas/workOrderData/changeMgmt/query').post(params).then(callback);
		}
		
		function exportView(lineViewEcharts,pieViewEcharts,send){
			send.base64 = [];
      var b = lineViewEcharts.getDataURL('png').split(',')[1];
      var c = pieViewEcharts.getDataURL('png').split(',')[1];
      send.base64 = [b,c];
      return JSON.stringify(send);
		}
	}
})();